let v = new Vue({
    el: '#app',
    data: function () {
        return {
            currentIndex: "1",
            clueArr: [{
                title: "三体公司采购暗物质",
                source: "引力波通讯",
                phone_number: 15271984958,
                address: "半人马星座",
                job: "猎人"
            }, {
                title: "三体公司采购暗物质",
                source: "引力波通讯",
                phone_number: 15271984958,
                address: "半人马星座",
                job: "猎人"
            }, {
                title: "三体公司采购暗物质",
                source: "引力波通讯",
                phone_number: 15271984958,
                address: "半人马星座",
                job: "猎人"
            }, {
                title: "三体公司采购暗物质",
                source: "引力波通讯",
                phone_number: 15271984958,
                address: "半人马星座",
                job: "猎人"
            }, {
                title: "三体公司采购暗物质",
                source: "引力波通讯",
                phone_number: 15271984958,
                address: "半人马星座",
                job: "猎人"
            }, {
                title: "三体公司采购暗物质",
                source: "引力波通讯",
                phone_number: 15271984958,
                address: "半人马星座",
                job: "猎人"
            }]
        }
    },
    methods: {
        closemenu() {
            let asideclose = document.getElementById("aside");
            let buttonclosehide = document.getElementById("closem");
            let buttonopenblock = document.getElementById("openm");
            asideclose.style.width = "50px";
            buttonclosehide.style.display = "none";
            buttonopenblock.style.display = "block";
        },
        openmenu() {
            let asideopen = document.getElementById("aside");
            let buttonopenhide = document.getElementById("openm");
            let buttoncloseblock = document.getElementById("closem");
            asideopen.style.width = "200px";
            buttonopenhide.style.display = "none";
            buttoncloseblock.style.display = "block";
        },

        handleSelect(key, keyPath) {
            //key就是导航菜单项的index的值
            v.currentIndex = key;
        },
        handleCategoryDelete(i, c) {
            v.categoryArr.splice(i, 1);
            v.$message.success("成功删除 " + c.name);
        },
        handleBannerDelete(i, b) {
            v.bannerArr.splice(i, 1);
            v.$message.success("成功删除轮播图");
        },
        handleProductDelete(i, p) {
            v.productArr.splice(i, 1);
            v.$message.success("成功删除 " + p.title);
        },
        onSubmit() {
            console.log('submit!');
        }

    }
})